home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / Drag.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  22.7 KB  |  593 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Drag.p
  3.  
  4.      Contains:    Drag and Drop Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1992-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT Drag;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __DRAG__}
  28. {$SETC __DRAG__ := 1}
  29.  
  30. {$I+}
  31. {$SETC DragIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __EVENTS__}
  38. {$I Events.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __FILES__}
  41. {$I Files.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __APPLEEVENTS__}
  44. {$I AppleEvents.p}
  45. {$ENDC}
  46. {$IFC UNDEFINED __QUICKDRAW__}
  47. {$I Quickdraw.p}
  48. {$ENDC}
  49.  
  50.  
  51. {$PUSH}
  52. {$ALIGN MAC68K}
  53. {$LibExport+}
  54.  
  55. {
  56.   _________________________________________________________________________________________________________
  57.       
  58.    • DRAG MANAGER DATA TYPES
  59.   _________________________________________________________________________________________________________
  60. }
  61.  
  62. TYPE
  63.     DragReference = ^LONGINT;
  64.     ItemReference                        = UInt32;
  65.     FlavorType                            = OSType;
  66. {
  67.   _________________________________________________________________________________________________________
  68.       
  69.    • DRAG ATTRIBUTES
  70.   _________________________________________________________________________________________________________
  71. }
  72.  
  73.     DragAttributes                        = OptionBits;
  74.  
  75. CONST
  76.     kDragHasLeftSenderWindow    = $00000001;                    {  drag has left the source window since TrackDrag }
  77.     kDragInsideSenderApplication = $00000002;                    {  drag is occurring within the sender application }
  78.     kDragInsideSenderWindow        = $00000004;                    {  drag is occurring within the sender window }
  79.  
  80. {
  81.   _________________________________________________________________________________________________________
  82.       
  83.    • DRAG IMAGE FLAGS
  84.   _________________________________________________________________________________________________________
  85. }
  86.  
  87.  
  88. TYPE
  89.     DragImageFlags                        = OptionBits;
  90.  
  91. CONST
  92.     kDragRegionAndImage            = $00000010;                    {  drag region and image }
  93.  
  94. {
  95.   _________________________________________________________________________________________________________
  96.       
  97.    • DRAG IMAGE TRANSLUCENCY LEVELS
  98.   _________________________________________________________________________________________________________
  99. }
  100.  
  101.  
  102. TYPE
  103.     DragImageTranslucency                = UInt32;
  104.  
  105. CONST
  106.     kDragStandardTranslucency    = 0;                            {  65% image translucency (standard) }
  107.     kDragDarkTranslucency        = 1;                            {  50% image translucency }
  108.     kDragDarkerTranslucency        = 2;                            {  25% image translucency }
  109.     kDragOpaqueTranslucency        = 3;                            {  0% image translucency (opaque) }
  110.  
  111. {
  112.   _________________________________________________________________________________________________________
  113.       
  114.    • DRAG DRAWING PROCEDURE MESSAGES
  115.   _________________________________________________________________________________________________________
  116. }
  117.  
  118.  
  119. TYPE
  120.     DragRegionMessage                    = SInt16;
  121.  
  122. CONST
  123.     kDragRegionBegin            = 1;                            {  initialize drawing }
  124.     kDragRegionDraw                = 2;                            {  draw drag feedback }
  125.     kDragRegionHide                = 3;                            {  hide drag feedback }
  126.     kDragRegionIdle                = 4;                            {  drag feedback idle time }
  127.     kDragRegionEnd                = 5;                            {  end of drawing }
  128.  
  129. {
  130.   _________________________________________________________________________________________________________
  131.       
  132.    • ZOOM ACCELERATION
  133.   _________________________________________________________________________________________________________
  134. }
  135.  
  136.  
  137. TYPE
  138.     ZoomAcceleration                    = SInt16;
  139.  
  140. CONST
  141.     kZoomNoAcceleration            = 0;                            {  use linear interpolation }
  142.     kZoomAccelerate                = 1;                            {  ramp up step size }
  143.     kZoomDecelerate                = 2;                            {  ramp down step size }
  144.  
  145. {
  146.   _________________________________________________________________________________________________________
  147.       
  148.    • FLAVOR FLAGS
  149.   _________________________________________________________________________________________________________
  150. }
  151.  
  152.  
  153. TYPE
  154.     FlavorFlags                            = OptionBits;
  155.  
  156. CONST
  157.     flavorSenderOnly            = $01;                            {  flavor is available to sender only }
  158.     flavorSenderTranslated        = $02;                            {  flavor is translated by sender }
  159.     flavorNotSaved                = $04;                            {  flavor should not be saved }
  160.     flavorSystemTranslated        = $0100;                        {  flavor is translated by system }
  161.  
  162. {
  163.   _________________________________________________________________________________________________________
  164.       
  165.    • SPECIAL FLAVORS
  166.   _________________________________________________________________________________________________________
  167. }
  168.  
  169.     flavorTypeHFS                = 'hfs ';                        {  flavor type for HFS data }
  170.     flavorTypePromiseHFS        = 'phfs';                        {  flavor type for promised HFS data }
  171.     flavorTypeDirectory            = 'diry';                        {  flavor type for AOCE directories }
  172.  
  173. {
  174.   _________________________________________________________________________________________________________
  175.       
  176.    • DRAG TRACKING HANDLER MESSAGES
  177.   _________________________________________________________________________________________________________
  178. }
  179.  
  180.  
  181. TYPE
  182.     DragTrackingMessage                    = SInt16;
  183.  
  184. CONST
  185.     kDragTrackingEnterHandler    = 1;                            {  drag has entered handler }
  186.     kDragTrackingEnterWindow    = 2;                            {  drag has entered window }
  187.     kDragTrackingInWindow        = 3;                            {  drag is moving within window }
  188.     kDragTrackingLeaveWindow    = 4;                            {  drag has exited window }
  189.     kDragTrackingLeaveHandler    = 5;                            {  drag has exited handler }
  190.  
  191. {
  192.   _________________________________________________________________________________________________________
  193.       
  194.    • HFS FLAVORS
  195.   _________________________________________________________________________________________________________
  196. }
  197.  
  198.  
  199. TYPE
  200.     HFSFlavorPtr = ^HFSFlavor;
  201.     HFSFlavor = RECORD
  202.         fileType:                OSType;                                    {  file type  }
  203.         fileCreator:            OSType;                                    {  file creator  }
  204.         fdFlags:                UInt16;                                    {  Finder flags  }
  205.         fileSpec:                FSSpec;                                    {  file system specification  }
  206.     END;
  207.  
  208.     PromiseHFSFlavorPtr = ^PromiseHFSFlavor;
  209.     PromiseHFSFlavor = RECORD
  210.         fileType:                OSType;                                    {  file type  }
  211.         fileCreator:            OSType;                                    {  file creator  }
  212.         fdFlags:                UInt16;                                    {  Finder flags  }
  213.         promisedFlavor:            FlavorType;                                {  promised flavor containing an FSSpec  }
  214.     END;
  215.  
  216. {
  217.   _________________________________________________________________________________________________________
  218.       
  219.    • APPLICATION-DEFINED DRAG HANDLER ROUTINES
  220.   _________________________________________________________________________________________________________
  221. }
  222.     DragTrackingHandlerProcPtr = ProcPtr;  { FUNCTION DragTrackingHandler(message: DragTrackingMessage; theWindow: WindowPtr; handlerRefCon: UNIV Ptr; theDrag: DragReference): OSErr; }
  223.  
  224.     DragReceiveHandlerProcPtr = ProcPtr;  { FUNCTION DragReceiveHandler(theWindow: WindowPtr; handlerRefCon: UNIV Ptr; theDrag: DragReference): OSErr; }
  225.  
  226.     DragTrackingHandlerUPP = UniversalProcPtr;
  227.     DragReceiveHandlerUPP = UniversalProcPtr;
  228.  
  229. CONST
  230.     uppDragTrackingHandlerProcInfo = $00003FA0;
  231.     uppDragReceiveHandlerProcInfo = $00000FE0;
  232.  
  233. FUNCTION NewDragTrackingHandlerProc(userRoutine: DragTrackingHandlerProcPtr): DragTrackingHandlerUPP;
  234.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  235.     INLINE $2E9F;
  236.     {$ENDC}
  237.  
  238. FUNCTION NewDragReceiveHandlerProc(userRoutine: DragReceiveHandlerProcPtr): DragReceiveHandlerUPP;
  239.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  240.     INLINE $2E9F;
  241.     {$ENDC}
  242.  
  243. FUNCTION CallDragTrackingHandlerProc(message: DragTrackingMessage; theWindow: WindowPtr; handlerRefCon: UNIV Ptr; theDrag: DragReference; userRoutine: DragTrackingHandlerUPP): OSErr;
  244.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  245.     INLINE $205F, $4E90;
  246.     {$ENDC}
  247.  
  248. FUNCTION CallDragReceiveHandlerProc(theWindow: WindowPtr; handlerRefCon: UNIV Ptr; theDrag: DragReference; userRoutine: DragReceiveHandlerUPP): OSErr;
  249.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  250.     INLINE $205F, $4E90;
  251.     {$ENDC}
  252. {
  253.   _________________________________________________________________________________________________________
  254.       
  255.    • APPLICATION-DEFINED ROUTINES
  256.   _________________________________________________________________________________________________________
  257. }
  258.  
  259. TYPE
  260.     DragSendDataProcPtr = ProcPtr;  { FUNCTION DragSendData(theType: FlavorType; dragSendRefCon: UNIV Ptr; theItemRef: ItemReference; theDrag: DragReference): OSErr; }
  261.  
  262.     DragInputProcPtr = ProcPtr;  { FUNCTION DragInput(VAR mouse: Point; VAR modifiers: SInt16; dragInputRefCon: UNIV Ptr; theDrag: DragReference): OSErr; }
  263.  
  264.     DragDrawingProcPtr = ProcPtr;  { FUNCTION DragDrawing(message: DragRegionMessage; showRegion: RgnHandle; showOrigin: Point; hideRegion: RgnHandle; hideOrigin: Point; dragDrawingRefCon: UNIV Ptr; theDrag: DragReference): OSErr; }
  265.  
  266.     DragSendDataUPP = UniversalProcPtr;
  267.     DragInputUPP = UniversalProcPtr;
  268.     DragDrawingUPP = UniversalProcPtr;
  269.  
  270. CONST
  271.     uppDragSendDataProcInfo = $00003FE0;
  272.     uppDragInputProcInfo = $00003FE0;
  273.     uppDragDrawingProcInfo = $000FFFA0;
  274.  
  275. FUNCTION NewDragSendDataProc(userRoutine: DragSendDataProcPtr): DragSendDataUPP;
  276.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  277.     INLINE $2E9F;
  278.     {$ENDC}
  279.  
  280. FUNCTION NewDragInputProc(userRoutine: DragInputProcPtr): DragInputUPP;
  281.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  282.     INLINE $2E9F;
  283.     {$ENDC}
  284.  
  285. FUNCTION NewDragDrawingProc(userRoutine: DragDrawingProcPtr): DragDrawingUPP;
  286.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  287.     INLINE $2E9F;
  288.     {$ENDC}
  289.  
  290. FUNCTION CallDragSendDataProc(theType: FlavorType; dragSendRefCon: UNIV Ptr; theItemRef: ItemReference; theDrag: DragReference; userRoutine: DragSendDataUPP): OSErr;
  291.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  292.     INLINE $205F, $4E90;
  293.     {$ENDC}
  294.  
  295. FUNCTION CallDragInputProc(VAR mouse: Point; VAR modifiers: SInt16; dragInputRefCon: UNIV Ptr; theDrag: DragReference; userRoutine: DragInputUPP): OSErr;
  296.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  297.     INLINE $205F, $4E90;
  298.     {$ENDC}
  299.  
  300. FUNCTION CallDragDrawingProc(message: DragRegionMessage; showRegion: RgnHandle; showOrigin: Point; hideRegion: RgnHandle; hideOrigin: Point; dragDrawingRefCon: UNIV Ptr; theDrag: DragReference; userRoutine: DragDrawingUPP): OSErr;
  301.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  302.     INLINE $205F, $4E90;
  303.     {$ENDC}
  304. {
  305.   _________________________________________________________________________________________________________
  306.       
  307.    • INSTALLING AND REMOVING HANDLERS API'S
  308.   _________________________________________________________________________________________________________
  309. }
  310.  
  311. FUNCTION InstallTrackingHandler(trackingHandler: DragTrackingHandlerUPP; theWindow: WindowPtr; handlerRefCon: UNIV Ptr): OSErr;
  312.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  313.     INLINE $7001, $ABED;
  314.     {$ENDC}
  315. FUNCTION InstallReceiveHandler(receiveHandler: DragReceiveHandlerUPP; theWindow: WindowPtr; handlerRefCon: UNIV Ptr): OSErr;
  316.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  317.     INLINE $7002, $ABED;
  318.     {$ENDC}
  319. FUNCTION RemoveTrackingHandler(trackingHandler: DragTrackingHandlerUPP; theWindow: WindowPtr): OSErr;
  320.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  321.     INLINE $7003, $ABED;
  322.     {$ENDC}
  323. FUNCTION RemoveReceiveHandler(receiveHandler: DragReceiveHandlerUPP; theWindow: WindowPtr): OSErr;
  324.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  325.     INLINE $7004, $ABED;
  326.     {$ENDC}
  327. {
  328.   _________________________________________________________________________________________________________
  329.       
  330.    • CREATING & DISPOSING
  331.   _________________________________________________________________________________________________________
  332. }
  333.  
  334. FUNCTION NewDrag(VAR theDrag: DragReference): OSErr;
  335.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  336.     INLINE $7005, $ABED;
  337.     {$ENDC}
  338. FUNCTION DisposeDrag(theDrag: DragReference): OSErr;
  339.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  340.     INLINE $7006, $ABED;
  341.     {$ENDC}
  342. {
  343.   _________________________________________________________________________________________________________
  344.       
  345.    • ADDING DRAG ITEM FLAVORS
  346.   _________________________________________________________________________________________________________
  347. }
  348.  
  349. FUNCTION AddDragItemFlavor(theDrag: DragReference; theItemRef: ItemReference; theType: FlavorType; dataPtr: UNIV Ptr; dataSize: Size; theFlags: FlavorFlags): OSErr;
  350.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  351.     INLINE $7007, $ABED;
  352.     {$ENDC}
  353. FUNCTION SetDragItemFlavorData(theDrag: DragReference; theItemRef: ItemReference; theType: FlavorType; dataPtr: UNIV Ptr; dataSize: Size; dataOffset: UInt32): OSErr;
  354.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  355.     INLINE $7009, $ABED;
  356.     {$ENDC}
  357. {
  358.   _________________________________________________________________________________________________________
  359.       
  360.    • PROVIDING CALLBACK PROCEDURES
  361.   _________________________________________________________________________________________________________
  362. }
  363.  
  364. FUNCTION SetDragSendProc(theDrag: DragReference; sendProc: DragSendDataUPP; dragSendRefCon: UNIV Ptr): OSErr;
  365.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  366.     INLINE $700A, $ABED;
  367.     {$ENDC}
  368.  
  369. FUNCTION SetDragInputProc(theDrag: DragReference; inputProc: DragInputUPP; dragInputRefCon: UNIV Ptr): OSErr;
  370.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  371.     INLINE $700B, $ABED;
  372.     {$ENDC}
  373. FUNCTION SetDragDrawingProc(theDrag: DragReference; drawingProc: DragDrawingUPP; dragDrawingRefCon: UNIV Ptr): OSErr;
  374.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  375.     INLINE $700C, $ABED;
  376.     {$ENDC}
  377. {
  378.   _________________________________________________________________________________________________________
  379.       
  380.    • SETTING THE DRAG IMAGE
  381.   _________________________________________________________________________________________________________
  382. }
  383.  
  384. FUNCTION SetDragImage(theDrag: DragReference; imagePixMap: PixMapHandle; imageRgn: RgnHandle; imageOffsetPt: Point; theImageFlags: DragImageFlags): OSErr;
  385.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  386.     INLINE $7027, $ABED;
  387.     {$ENDC}
  388. {
  389.   _________________________________________________________________________________________________________
  390.       
  391.    • PERFORMING A DRAG
  392.   _________________________________________________________________________________________________________
  393. }
  394.  
  395. FUNCTION TrackDrag(theDrag: DragReference; {CONST}VAR theEvent: EventRecord; theRegion: RgnHandle): OSErr;
  396.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  397.     INLINE $700D, $ABED;
  398.     {$ENDC}
  399. {
  400.   _________________________________________________________________________________________________________
  401.       
  402.    • GETTING DRAG ITEM INFORMATION
  403.   _________________________________________________________________________________________________________
  404. }
  405.  
  406. FUNCTION CountDragItems(theDrag: DragReference; VAR numItems: UInt16): OSErr;
  407.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  408.     INLINE $700E, $ABED;
  409.     {$ENDC}
  410. FUNCTION GetDragItemReferenceNumber(theDrag: DragReference; index: UInt16; VAR theItemRef: ItemReference): OSErr;
  411.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  412.     INLINE $700F, $ABED;
  413.     {$ENDC}
  414. FUNCTION CountDragItemFlavors(theDrag: DragReference; theItemRef: ItemReference; VAR numFlavors: UInt16): OSErr;
  415.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  416.     INLINE $7010, $ABED;
  417.     {$ENDC}
  418. FUNCTION GetFlavorType(theDrag: DragReference; theItemRef: ItemReference; index: UInt16; VAR theType: FlavorType): OSErr;
  419.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  420.     INLINE $7011, $ABED;
  421.     {$ENDC}
  422. FUNCTION GetFlavorFlags(theDrag: DragReference; theItemRef: ItemReference; theType: FlavorType; VAR theFlags: FlavorFlags): OSErr;
  423.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  424.     INLINE $7012, $ABED;
  425.     {$ENDC}
  426. FUNCTION GetFlavorDataSize(theDrag: DragReference; theItemRef: ItemReference; theType: FlavorType; VAR dataSize: Size): OSErr;
  427.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  428.     INLINE $7013, $ABED;
  429.     {$ENDC}
  430. FUNCTION GetFlavorData(theDrag: DragReference; theItemRef: ItemReference; theType: FlavorType; dataPtr: UNIV Ptr; VAR dataSize: Size; dataOffset: UInt32): OSErr;
  431.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  432.     INLINE $7014, $ABED;
  433.     {$ENDC}
  434. {
  435.   _________________________________________________________________________________________________________
  436.       
  437.    • DRAG ITEM BOUNDS
  438.   _________________________________________________________________________________________________________
  439. }
  440.  
  441. FUNCTION GetDragItemBounds(theDrag: DragReference; theItemRef: ItemReference; VAR itemBounds: Rect): OSErr;
  442.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  443.     INLINE $7015, $ABED;
  444.     {$ENDC}
  445. FUNCTION SetDragItemBounds(theDrag: DragReference; theItemRef: ItemReference; {CONST}VAR itemBounds: Rect): OSErr;
  446.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  447.     INLINE $7016, $ABED;
  448.     {$ENDC}
  449. {
  450.   _________________________________________________________________________________________________________
  451.       
  452.    • DROP LOCATIONS
  453.   _________________________________________________________________________________________________________
  454. }
  455.  
  456. FUNCTION GetDropLocation(theDrag: DragReference; VAR dropLocation: AEDesc): OSErr;
  457.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  458.     INLINE $7017, $ABED;
  459.     {$ENDC}
  460. FUNCTION SetDropLocation(theDrag: DragReference; {CONST}VAR dropLocation: AEDesc): OSErr;
  461.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  462.     INLINE $7018, $ABED;
  463.     {$ENDC}
  464. {
  465.   _________________________________________________________________________________________________________
  466.       
  467.    • GETTING INFORMATION ABOUT A DRAG
  468.   _________________________________________________________________________________________________________
  469. }
  470.  
  471. FUNCTION GetDragAttributes(theDrag: DragReference; VAR flags: DragAttributes): OSErr;
  472.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  473.     INLINE $7019, $ABED;
  474.     {$ENDC}
  475. FUNCTION GetDragMouse(theDrag: DragReference; VAR mouse: Point; VAR globalPinnedMouse: Point): OSErr;
  476.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  477.     INLINE $701A, $ABED;
  478.     {$ENDC}
  479. FUNCTION SetDragMouse(theDrag: DragReference; globalPinnedMouse: Point): OSErr;
  480.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  481.     INLINE $701B, $ABED;
  482.     {$ENDC}
  483. FUNCTION GetDragOrigin(theDrag: DragReference; VAR globalInitialMouse: Point): OSErr;
  484.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  485.     INLINE $701C, $ABED;
  486.     {$ENDC}
  487. FUNCTION GetDragModifiers(theDrag: DragReference; VAR modifiers: SInt16; VAR mouseDownModifiers: SInt16; VAR mouseUpModifiers: SInt16): OSErr;
  488.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  489.     INLINE $701D, $ABED;
  490.     {$ENDC}
  491. {
  492.   _________________________________________________________________________________________________________
  493.       
  494.    • DRAG HIGHLIGHTING
  495.   _________________________________________________________________________________________________________
  496. }
  497.  
  498. FUNCTION ShowDragHilite(theDrag: DragReference; hiliteFrame: RgnHandle; inside: BOOLEAN): OSErr;
  499.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  500.     INLINE $701E, $ABED;
  501.     {$ENDC}
  502. FUNCTION HideDragHilite(theDrag: DragReference): OSErr;
  503.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  504.     INLINE $701F, $ABED;
  505.     {$ENDC}
  506. FUNCTION DragPreScroll(theDrag: DragReference; dH: SInt16; dV: SInt16): OSErr;
  507.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  508.     INLINE $7020, $ABED;
  509.     {$ENDC}
  510. FUNCTION DragPostScroll(theDrag: DragReference): OSErr;
  511.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  512.     INLINE $7021, $ABED;
  513.     {$ENDC}
  514. FUNCTION UpdateDragHilite(theDrag: DragReference; updateRgn: RgnHandle): OSErr;
  515.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  516.     INLINE $7022, $ABED;
  517.     {$ENDC}
  518. FUNCTION GetDragHiliteColor(window: WindowPtr; VAR color: RGBColor): OSErr;
  519.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  520.     INLINE $7026, $ABED;
  521.     {$ENDC}
  522.  
  523. {
  524.   _________________________________________________________________________________________________________
  525.       
  526.    • UTILITIES
  527.   _________________________________________________________________________________________________________
  528. }
  529.  
  530.  
  531. FUNCTION WaitMouseMoved(initialMouse: Point): BOOLEAN;
  532.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  533.     INLINE $7023, $ABED;
  534.     {$ENDC}
  535.  
  536. FUNCTION ZoomRects({CONST}VAR fromRect: Rect; {CONST}VAR toRect: Rect; zoomSteps: SInt16; acceleration: ZoomAcceleration): OSErr;
  537.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  538.     INLINE $7024, $ABED;
  539.     {$ENDC}
  540. FUNCTION ZoomRegion(region: RgnHandle; zoomDistance: Point; zoomSteps: SInt16; acceleration: ZoomAcceleration): OSErr;
  541.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  542.     INLINE $7025, $ABED;
  543.     {$ENDC}
  544.  
  545. {
  546.   _________________________________________________________________________________________________________
  547.    • OLD NAMES
  548.      These are provided for compatiblity with older source bases.  It is recommended to not use them since
  549.        they may removed from this interface file at any time.
  550.   _________________________________________________________________________________________________________
  551. }
  552.  
  553. {$IFC OLDROUTINENAMES }
  554.  
  555. CONST
  556.     dragHasLeftSenderWindow        = $00000001;                    {  drag has left the source window since TrackDrag  }
  557.     dragInsideSenderApplication    = $00000002;                    {  drag is occurring within the sender application  }
  558.     dragInsideSenderWindow        = $00000004;                    {  drag is occurring within the sender window  }
  559.  
  560.     dragTrackingEnterHandler    = 1;                            {  drag has entered handler  }
  561.     dragTrackingEnterWindow        = 2;                            {  drag has entered window  }
  562.     dragTrackingInWindow        = 3;                            {  drag is moving within window  }
  563.     dragTrackingLeaveWindow        = 4;                            {  drag has exited window  }
  564.     dragTrackingLeaveHandler    = 5;                            {  drag has exited handler  }
  565.  
  566.     dragRegionBegin                = 1;                            {  initialize drawing  }
  567.     dragRegionDraw                = 2;                            {  draw drag feedback  }
  568.     dragRegionHide                = 3;                            {  hide drag feedback  }
  569.     dragRegionIdle                = 4;                            {  drag feedback idle time  }
  570.     dragRegionEnd                = 5;                            {  end of drawing  }
  571.  
  572.     zoomNoAcceleration            = 0;                            {  use linear interpolation  }
  573.     zoomAccelerate                = 1;                            {  ramp up step size  }
  574.     zoomDecelerate                = 2;                            {  ramp down step size  }
  575.  
  576.     kDragStandardImage            = 0;                            {  65% image translucency (standard) }
  577.     kDragDarkImage                = 1;                            {  50% image translucency }
  578.     kDragDarkerImage            = 2;                            {  25% image translucency }
  579.     kDragOpaqueImage            = 3;                            {  0% image translucency (opaque) }
  580.  
  581. {$ENDC}  {OLDROUTINENAMES}
  582.  
  583. {$ALIGN RESET}
  584. {$POP}
  585.  
  586. {$SETC UsingIncludes := DragIncludes}
  587.  
  588. {$ENDC} {__DRAG__}
  589.  
  590. {$IFC NOT UsingIncludes}
  591.  END.
  592. {$ENDC}
  593.